package com.safe.first.interfaces.controller;

import cn.hutool.captcha.generator.RandomGenerator;
import com.safe.first.application.service.SmsService;
import com.safe.first.common.model.R;
import lombok.AllArgsConstructor;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author Mickey
 * @since 2022/6/28
 **/
@RestController
@RequestMapping("/sms")
@AllArgsConstructor
public class SmsController {

    private final SmsService smsService;

    @GetMapping("/code")
    public R<?> code(String mobile) {
        smsService.code(mobile);
        return R.OK();
    }

}
